<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>HelloWorld</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <p>
            {{msg}}
            {{count+1}}
        </p>
        {{user}}
        <br>
        姓名：{{user.name}}
        年龄：{{user.age}}
        <br>
        数组：{{arr[1]}}
        <br>
        <input type="text" :value="msg"><br>
        <input type="text" v-model="msg">
        <br>
       {{sayHello()}}

    </div>
</body>
<script>
    new Vue({
        el:"#app",
        data: {
            msg: "10086",
            count: 1,
            user: {
                name: "张三",
                age: 16,
                sex: '男'
            },
            arr:["123",1234,"zf"]
        },
        methods:{
            sayHello(){
                this.say();
                this.user.age=10;
                return "hello vue";
            },
            say(){
                console.log("say执行了");
            }
        }
    });
</script>
</html>